﻿using EquipmentAlarmSystem.Service.Models;

namespace EquipmentAlarmSystem.Service.EquipmentCommunicationUnit;

/// <summary>
/// 设备通信接口
/// </summary>
public interface ICommunication
{
    /// <summary>
    /// 连接状态
    /// </summary>
    public bool Connected { get; }

    /// <summary>
    /// 设备信息
    /// </summary>
    public DeviceInformation Information { get; }

    /// <summary>
    /// 打开
    /// </summary>
    public void Open();

    /// <summary>
    /// 读取
    /// </summary>
    public void Read(out List<PointInformation> result);

    /// <summary>
    /// 报警读取
    /// </summary>
    public bool AlarmReading(out List<PointInformation> result, out bool isReconnection, out string content);

    /// <summary>
    /// 关闭
    /// </summary>
    public void Close();
}
